package com.demo.weixin.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@RequestMapping("bj")
@Controller
public class WeiXinController {

    @Resource
    private HttpServletRequest request;

    @RequestMapping("weixin")
    public String weixin() {
        return "weixin";
    }

    @RequestMapping("weixin-loading")
    @ResponseBody
    public String weixinLoading() {
        String cookiesStr = request.getHeader("Cookie");
        return cookiesStr;
    }
}
